package com.youthfilmic.yuejian.weixin.core;

import com.youthfilmic.yuejian.util.RedisUtil;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created by youweixi on 15/10/8.
 * 微信token托管
 */
@Component
public class TokenSystem {
    /**
     * weixin token value
     * */
    private static String tokenValue = null;
    /**
     * weixin ticket value
     * */
    private static String ticketValue = null;
    /**
     * weixin token value
     * */
    private static String tokenValuePreKey = "SERVICE|WEIXIN|TOKEN:";
    /**
     * weixin ticket value
     * */
    private static String ticketValuePryKey = "SERVICE|WEIXIN|TICKET:";


    public static String getTokenValue() {
        return RedisUtil.get(tokenValuePreKey);
    }

    public static String getTicketValue() {
        return RedisUtil.get(ticketValuePryKey);
    }
}
